package Text_74;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;

public class Code {

	public static void main(String[] args) throws IOException {
		File f  = new File("E:\\A\\aaa.txt");
        //文件长度
        long length = f.length();
        //文件名
        String name = f.getName();
        boolean b = f.canExecute();
        //创建新文件
        System.out.println(length+" "+name);
        File f1 = new File("E:\\A\\cc.txt");
        boolean newFile = f1.createNewFile();
        //获取盘符
        File[] files = File.listRoots();
        System.out.println(Arrays.toString(files));
        //获取当前路径小的内容
        File f2 = new File("E:\\A");
        File[] files1 = f2.listFiles();
        for(File ff: files1){
            System.out.println(ff);
        }

	}

}
